home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / f90 / atan2.z / atan2
Encoding:
Text File  |  2002-10-03  |  5.7 KB  |  128 lines

  1. ATAN2(3I)                                             Last changed: 4-13-99
  2.  
  3.  
  4. NNAAMMEE
  5.      AATTAANN22, DDAATTAANN22, QQAATTAANN22, AATTAANN22DD, DDAATTAANN22DD, QQAATTAANN22DD - Computes arc tangent
  6.      (inverse tangent) for two arguments
  7.  
  8. SSYYNNOOPPSSIISS
  9.      AATTAANN22 (([YY==]_y,,[XX==]_x))
  10.      DDAATTAANN22 (([YY==]_y,,[XX==]_x))
  11.      QQAATTAANN22 (([YY==]_y,,[XX==]_x))
  12.  
  13.      AATTAANN22DD (([YY==]_y,,[XX==]_x))
  14.      DDAATTAANN22DD (([YY==]_y,,[XX==]_x))
  15.      QQAATTAANN22DD (([YY==]_y,,[XX==]_x))
  16.  
  17. IIMMPPLLEEMMEENNTTAATTIIOONN
  18.      UNICOS, UNICOS/mk, IRIX systems
  19.  
  20.      CF90, MIPSpro 7 Fortran 90, MIPSpro Fortran 77
  21.  
  22. SSTTAANNDDAARRDDSS
  23.      Fortran
  24.  
  25.      Fortran extensions:  QQAATTAANN22, AATTAANN22DD, DDAATTAANN22DD, QQAATTAANN22DD
  26.  
  27. DDEESSCCRRIIPPTTIIOONN
  28.      AATTAANN22, DDAATTAANN22, and QQAATTAANN22 return the arc tangent, for two arguments,
  29.      in radians.  AATTAANN22DD, DDAATTAANN22DD, and QQAATTAANN22DD return the arc tangent, for
  30.      two arguments, in degrees.  These intrinsics accept the following
  31.      arguments:
  32.  
  33.      _y         Must be type real.  For DDAATTAANN22 and DDAATTAANN22DD, must be of type
  34.                double precision.  For QQAATTAANN22 and QQAATTAANN22DD, must be of type
  35.                quad precision.  See the RETURN VALUES section for
  36.                information on input data types and return values.  The data
  37.                type and kind type for single-precision, double-precision,
  38.                and quad-precision values differ depending on your platform.
  39.                For platform-specific information, see the TERMINOLOGY
  40.                section of the IINNTTRROO__IINNTTRRIINN(3I) man page.
  41.  
  42.                For AATTAANN22, DDAATTAANN22, and QQAATTAANN22, the following rules apply:
  43.  
  44.                * If _y is positive, the result is positive.
  45.  
  46.                * If _y is negative, the result is negative.
  47.  
  48.                * If _y is positive or negative zero, and if _x is positive,
  49.                  the result is positive or negative zero.
  50.  
  51.                * If _y is positive or negative zero, and if _x is negative,
  52.                  the result is positive or negative pi.
  53.  
  54.                * If _y is zero, _x cannot also be zero.
  55.  
  56.                For AATTAANN22DD, DDAATTAANN22DD, and QQAATTAANN22DD, the following rules apply:
  57.  
  58.                * If _y is positive, the result is positive.
  59.  
  60.                * If _y is negative, the result is negative.
  61.  
  62.                * If _y is zero, and if _x is positive, the result is zero.
  63.  
  64.                * If _y is zero, and if _x is negative, the result is 180.0.
  65.  
  66.                * If _y is zero, _x cannot also be zero.
  67.  
  68.      _x         Must be of type real.  For DDAATTAANN22 and DDAATTAANN22DD, must be of
  69.                type double-precision.  For QQAATTAANN22 and QQAATTAANN22DD, must be of
  70.                type quad-precision.  See the RETURN VALUES section for
  71.                information on input data types and return values.  The data
  72.                type and kind type for real, double-precision, and
  73.                quad-precision values differ depending on your platform.
  74.                For platform-specific information, see the TERMINOLOGY
  75.                section of the IINNTTRROO__IINNTTRRIINN(3I) man page.
  76.  
  77.                For AATTAANN22, DDAATTAANN22, and QQAATTAANN22, the following rules apply:
  78.  
  79.                * If _x is zero, _y cannot also be zero.
  80.  
  81.                * If _x is zero, the value of the absolute value of the
  82.                  result is pi/2.
  83.  
  84.                For AATTAANN22DD, DDAATTAANN22DD, and QQAATTAANN22DD, the following rules apply:
  85.  
  86.                * If _x is zero, _y cannot also be zero.
  87.  
  88.                * If _x is zero, the absolute value of the result is 90.0.
  89.  
  90.      AATTAANN22 and AATTAANN22DD are generic function names; the others are specifics.
  91.      These are elemental intrinsic functions.
  92.  
  93.      Vector versions of AATTAANN22 and DDAATTAANN22 exist on UNICOS and UNICOS/mk
  94.      systems.  On UNICOS/mk systems, the vector versions of these
  95.      intrinsics are used when --OO vveeccttoorr33 or --OO33 are specified on the
  96.      compiler command line.  On UNICOS/mk systems, the 64-bit intrinsic
  97.      vectorizes; the 32-bit version does not.
  98.  
  99.      These functions evaluate _y = arctan(_y/_x).
  100.  
  101.      The result range, in radians, for AATTAANN22, DDAATTAANN22, and QQAATTAANN22 is as
  102.      follows:
  103.  
  104.           -pi <= _r_e_s_u_l_t <= pi
  105.  
  106.      The result range, in degrees, for AATTAANN22DD, DDAATTAANN22DD, and QQAATTAANN22DD is as
  107.      follows:
  108.  
  109.           -180 <= _r_e_s_u_l_t <= 180
  110.  
  111. NNOOTTEESS
  112.      The AATTAANN22 and DDAATTAANN22 intrinsic function names can be passed as
  113.      arguments; the others cannot.
  114.  
  115. RREETTUURRNN VVAALLUUEESS
  116.      AATTAANN22 and AATTAANN22DD return the real arc tangent of the quotient of their
  117.      real arguments.
  118.  
  119.      DDAATTAANN22 and DDAATTAANN22DD return the double-precision arc tangent of the
  120.      quotient of their double-precision arguments.
  121.  
  122.      QQAATTAANN22 and QQAATTAANN22DD return the quad-precision arc tangent of the
  123.      quotient of their quad-precision arguments.
  124.  
  125. SSEEEE AALLSSOO
  126.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed version of this
  127.      man page.
  128.